﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using tactics.Interfaces;

namespace tactics.StatusEffects
{
    public class SpeedStatusEffect : StatusEffectBase
    {
        public SpeedStatusEffect(int idIn, string nameIn, int durationIn, int amountIn, string textureIn)
        {
            this.id = idIn;
            this.name = nameIn;
            this.duration = durationIn;
            this.amount = amountIn;
            this.texture = textureIn;
        }

        public override IStatusEffect Clone()
        {
            return new SpeedStatusEffect(this.id, this.name, this.duration, this.amount, this.texture);
        }

        public override void ProcessEffect(Unit targetUnit)
        {
            targetUnit.CurrentSpeed += amount;
            --duration;
        }
    }
}
